﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>@ViewBag.Title</title>
    <link href="../Content/Styles/menu_main.css" rel="stylesheet" type="text/css" />    
    <script src="@Url.Content("~/Scripts/jquery-1.6.2.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/SpryEffects.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    @if (IsSectionDefined("HeaderSection"))
        {
            @RenderSection("HeaderSection", false)
        }
<!--[if IE 5]>
<style type="text/css"> 
/* place css box model fixes for IE 5* in this conditional comment */
</style>
<![endif]--><!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
#mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<!--[if IE 6]>
<style>
body{behavior: url("../Scripts/csshover3.htc");}
</style>
<![endif]-->
@{
       
    ViewBag.RootWebSite = "rippollwebmvc";
    
    if(Session[RipPoll.Common.WebConstants.CurrentUser] != null)
        {
            ViewBag.SinInOrSignOut = "Signout";
            ViewBag.Join = "";
        }
    else
        {
            ViewBag.SinInOrSignOut = "Signin";
            ViewBag.Join = "Join";
        }
}

    <style type="text/css">
        .TextBox200 { width:200px}
        .TextBox300 { width:300px}
        .TextBox100 { width:100px}
    </style>
    <script type="text/javascript">
<!--
        $.ajaxSetup({ cache: false });

        $(document).ready(function () {

            var linkObj;
            $('#appDiv4').dialog({
                autoOpen: false,
                width: 400,
                resizable: false,
                modal: true,
                closeText: ''
            });

            $('#appDiv3').dialog({
                autoOpen: false,
                width: 400,
                resizable: false,
                modal: true,
                closeText: ''
            });

            $(".signinLink").click(function () {
                //change the title of the dialgo
                linkObj = $(this);
                var dialogDiv = $('#appDiv4');
                var viewUrl = linkObj.attr('href');
                $.get(viewUrl, function (data) {
                    dialogDiv.html('');
                    dialogDiv.html(data);
                    //validation
                    var $form = $("#popupSignInForm");
                    // Unbind existing validation
                    $form.unbind();
                    $form.data("validator", null);
                    // Check document for changes
                    $.validator.unobtrusive.parse(document);
                    // Re add validation with changes
                    $form.validate($form.data("unobtrusiveValidation").options);
                    //open dialog
                    dialogDiv.dialog('open');
                });
                return false;
            });

            $(".joinLink").click(function () {
                //change the title of the dialgo
                linkObj = $(this);
                var dialogDivJoin = $('#appDiv3');
                var viewUrl = linkObj.attr('href');
                $.get(viewUrl, function (data) {
                    dialogDivJoin.html('');
                    dialogDivJoin.html(data);
                    //validation
                    var $form = $("#popupJoinForm");
                    // Unbind existing validation
                    $form.unbind();
                    $form.data("validator", null);
                    // Check document for changes
                    $.validator.unobtrusive.parse(document);
                    // Re add validation with changes
                    $form.validate($form.data("unobtrusiveValidation").options);
                    //open dialog
                    dialogDivJoin.dialog('open');
                });
                return false;
            });


            $('a[id="signout"]').click(function () {
                window.location.href = "../User/Signout";
                return false;
            });
        });

        function SignInSuccess() {
            if ($("#signin-message").html() == "True") {
                //now we can close the dialog
                $('#appDiv4').dialog('close');
                window.location.reload(true);
            }
            else {
                $("#signin-message").show();
            }
        }

        function JoinSuccess() {
            if ($("#join-message").html() == "True") {
                //now we can close the dialog
                $('#appDiv3').dialog('close');
                window.location.reload(true);
            }
            else {
                $("#join-message").show();
            }
        }

        function MM_showHideLayers() { //v9.0
            var i, p, v, obj, args = MM_showHideLayers.arguments;
            for (i = 0; i < (args.length - 2); i += 3)
                with (document) if (getElementById && ((obj = getElementById(args[i])) != null)) {
                    v = args[i + 2];
                    if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
                    obj.visibility = v;
                }
        }

        function MM_preloadImages() { //v3.0
            var d = document; if (d.images) {
                if (!d.MM_p) d.MM_p = new Array();
                var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
                    if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; } 
            }
        }
        function MM_openBrWindow(theURL, winName, features) { //v2.0
            window.open(theURL, winName, features);
        }
//-->
</script>
     
</head>

@if (IsSectionDefined("PreBodySection"))
{
    @RenderSection("PreBodySection", false)
}
       
<body>
    <div id="container">
        <div id="appDiv3"  style="text-align:center;margin:0 auto">
        </div>
        <div id="appDiv4" style="text-align:center;margin:0 auto">
        </div>
        <div id="@ViewBag.PageDivId">
            <div id="menuUpper">
                <ul>
                    <li class="upperMenuItem">
                        @if (!string.IsNullOrEmpty(ViewBag.SinInOrSignOut) && ((string)ViewBag.SinInOrSignOut).ToLower() == "signin")
                        {
                        @Html.ActionLink("Sign In", "newpopupsignin", "user", null, new { @class = "signinLink" })
                        }
                        else
                        {
                            <li class="upperMenuItem"><a class="upperMenuItem" id="signout" >@ViewBag.SinInOrSignOut</a></li>                            
                        }
                    </li>
                    @if (!string.IsNullOrEmpty(ViewBag.SinInOrSignOut) && ((string)ViewBag.SinInOrSignOut).ToLower() == "signin")
                    {
                    <li class="upperMenuItem">
                        @Html.ActionLink("Join", "newpopupjoin", "user", null, new { @class = "joinLink" })
                    </li>
                    }
                    <li class="upperMenuItem">Help</li>
                </ul>
            </div>
            <div id="date">
                <input name="Search" id="Search" value="Search" type="text" />
                <input name="go" id="go" value="Go" type="submit" />
            </div>
            @if (IsSectionDefined("LocalHeaderSection"))
            {
                @RenderSection("LocalHeaderSection", false)
            }
        </div>
        @if (string.IsNullOrEmpty(ViewBag.HideMenu) && ViewBag.HideMenu != "true")
        {        <!-- menu -->
        <div id="menu3">
            <ul id="list">
                    <li><a href="../Home/Index1">Home</a></li>
                    <li><a href="#">My Page</a>
      	            <div class="dropdownMyPage">      
		            <a href="#">My Page</a>
		            <a href="../Poll/myrippolls">My rippolls</a>
		            <a href="../Community/MyCommunities">My Communities</a>
                    </div>      
                    </li>
                    <li><a href="#">Bulletin Board</a>
                    <div class="dropdownBullBoard">
		            <a href="../Common/BBLocal">Local</a>
		            <a href="../Common/BBWorld">World</a>
		            <a href="../Common/BBPolitics">Politics</a>
		            <a href="../Common/BBSports">Sports</a>
		            <a href="../Common/BBEntertainment">Entertainment</a>
                    </div> 
                    </li>
                    <li><a href="#">rippoll / Community</a>
      	            <div class="dropdownCreate">
                    <a href="../poll/pollcommunity">What is a rippoll?</a>
		            <a href="../poll/pollcommunity">What is a Community?</a>
		            <a href="/@ViewBag.RootWebSite/poll/create1">Create a rippoll</a>
		            <a href="/@ViewBag.RootWebSite/community/create1">Create a Community</a>
                    </div>  
                    </li>
                    <li><a href="../Common/Local">Local</a>
      	            <div class="dropdownLocal">
                    <a href="../Common/Local">Local Sports</a>
		            <a href="../Common/Local">Local Politics</a>
		            <a href="../Common/Local">Local Entertainment</a>
		            </div>
                    </li>
                    <li><a href="../Common/World">World</a>
                    <div class="dropdownWorld">
                    <a href="../Common/Sports">World Sports</a>
		            <a href="../Common/Politics">World Politics</a>
		            <a href="../Common/Entertainment">World Entertainment</a>
		            </div>
                    </li>      
                    <li><a href="../Common/Politics">Politics</a>
                    </li>
                    <li><a href="../Common/Sports">Sports</a>
                    </li>
                    <li><a href="../Common/Entertainment">Entertainment</a>
                </ul>
                </div>
        <br />
        }
        <div id="StatusMessage" style="font:15;@ViewBag.Margin">
        @if (IsSectionDefined("StatusMessage"))
        {
            @RenderSection("StatusMessage", false)
        }
    </div>
    @RenderBody()
    <br class="clearfloat" /> 

    </div>
    
    <div id="footerBase"></div>        
    <div id="footer" style="background:#6B78BE">
                <div id="footerListContainer">
                    <div id="footerIcon">      
                        <img src="../Content/images/small_logo.png" alt="rippoll.com" width="96" height="97" />    
                    </div>
    
                    <div id="footerListBox">
                        <div id="footerList">
                            <ul>
                            <li>About</li>
                            <li>:</li>
                            <li>The Team</li>
                            <li>:</li>
                            <li>Press</li>

                            <li>:</li>
                            <li>FAQs</li>
                            </ul>
                        </div>
                        <div id="footerList">
                            <ul>
                            <li>Advertise</li>
                            <li>:</li>
                            <li>Learn More</li>
                            <li>:</li>
                            <li>Legal Stuff</li>
                            <li>:</li>
                            <li>Contact Us</li>
                            </ul>
                        </div>    
                    </div>
    
                    <div id="footerRightInfo"> 
                        <span class="boldWhiteText">follow us on:<img src="../Content/images/social_media_links.png" width="78" height="22" alt="Rippoll.com" /></span>
                        <br />
                        <br />
                        Rippoll combines the power of social media with the power of public opinion. Create a rippoll, share with your friends - they will cast their votes and bring about change. We call this the &quot;rippoll effect&quot;. Make your rippoll today.<br />
                        <img src="../Content/images/footer_logo.png" alt="rippoll.com" width="148" height="35" align="right" class="footerLogo" /> 
                    </div>

                    <div id="footerInfo">
                        <p><span class="textLeft">© 2011 rippoll, inc. All Rights Reserved</span></p>                    
                    </div>
                </div>    
            </div>
        
</body>
</html>